package com.sky.mapper.admin;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.DishPageQueryDTO;
import com.sky.enumeration.OperationType;
import com.sky.pojo.Dish;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DishMapper {
    /**
     * 插入数据
     * @param
     */
    @AutoFill(value = OperationType.INSERT)
    void saveDish(Dish dish);

    Page<DishVO> pageDish(DishPageQueryDTO dishPageQueryDTO);

    void deleteDish(List<Integer> ids);

    Dish selectDish(Long dishId);
    /**
     * 修改数据
     * @param
     */
    @AutoFill(value = OperationType.UPDATE)
    void updateDish(Dish dish);

    void ActivateAndForbiddenDish(String status, Integer id);

    List<Dish> list(Dish dish);
    /**
     * 菜品总览的接口设计
     * */
    Integer countStatus(Integer paid);
}
